package com.jrx.anytxn.reporting.job.customer.step;

import com.jrx.anytxn.customer.entity.CmCustomerSecondLevel;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.batch.MyBatisPagingItemReader;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：lihm
 * @date ：2019/11/27 9:17
 */
public class AutoAssemCustomerReader extends MyBatisPagingItemReader<CmCustomerSecondLevel> {

    public AutoAssemCustomerReader(SqlSessionFactory sqlSessionFactory , Integer pageSize , String startDate){
        setSaveState(false);
        setPageSize(pageSize);
        setSqlSessionFactory(sqlSessionFactory);
        setQueryId("com.jrx.anytxn.customer.mapper.ext.ExtCmCustomerSecondLevelMapper.selectByUpdateTime");
        Map<String,Object> map = new HashMap<>();
        map.put("startTime",startDate);
        setParameterValues(map);
    }
}
